//----------------------------------------------------------------------------
// M A R I T I M E  R E S E A R C H  I N S T I T U T E  N E T H E R L A N D S
//----------------------------------------------------------------------------
// Copyright (C) 2012 - MARIN - All rights reserved - http://www.marin.nl
//----------------------------------------------------------------------------
// Program    : mermaid
// Module     : vbm
// File       : shiftpsi.h
// Author     : M.A. de Jong
//----------------------------------------------------------------------------

#ifndef SHIFTPSI_H
#define SHIFTPSI_H

#include "kernels/shiftpsi_kernels.h"

namespace wavescomputer
{

template <class T>
inline void shiftpsi(T* psim2, T* psim1, const T* psi,
                     const int nx, const int ny)
{
    dimGrid.x = nx / NUM_THREADS_X;
    dimGrid.y = ny / NUM_THREADS_Y;
    dimBlock.x = NUM_THREADS_X;
    dimBlock.y = NUM_THREADS_Y;

    kernel_shiftpsi<T> <<< dimGrid, dimBlock >>> (psim2, psim1, psi, nx);

    checkCudaError(cudaGetLastError(), "wavescomputer::kernel_shiftpsi");
}

} // namespace wavescomputer

#endif // SHIFTPSI_H

